package com.lfl.spring6.service;

import com.lfl.spring6.dao.UserDao;

public class UserService {
    private UserDao userDao;

    // 通过set方法注入
//    public void setUserDao(UserDao userDao) {
//        this.userDao = userDao;
//    }
    //自定义方法注入
    public void setMySQLUserDao(UserDao abc) {
        this.userDao = abc;
    }

    public void saveUser() {
        userDao.insert();
    }
}
